
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>缺货锁码提醒管理</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
        .row {
            margin: 0;
            padding: 0
        }

    </style>

</head>

<body class="white-bg" style="padding: 3px;">
    <div class="page-heade">
       <h2 class="title_color text-center">工单类型管理</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei">
            <tr>
                <td>
                    <button class="btn btn-sm btn-primary addworkKind">新增工单类型</button>
                </td>
                <td style="width: 10%"><a href="javascript:;" class="btn btn-info">回收站</a></td>
            </tr>
        </table>
        <table class="table table-bordered bud_hei">
             <tr>
                <td><label for="kindName">类型名称：</label></td>
                <td><input type="text" class="form-control inputremindPeple" id="kindName" name="kindName" value=""></td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center;">
                    <button class="btn btn-info">查询</button>
                    <button class="btn btn-info emtyif" id="reset">清空查询条件</button>
                </td>
            </tr>
        </table>
    </form>
    <table class="table table-striped table-bordered table-hover bud_hei text-center aprovalSystemTable" style="width: 100%;">
        <tr class="info">
            <th class="text-center">No.</th>
            <th class="text-center">类型名称</th>
            <th class="text-center">说明</th>
            <th class="text-center">添加时间</th>
            <th class="text-center">添加人</th>
            <th class="text-center">最终修改时间</th>
            <th class="text-center">最终修改人</th>
            <th class="text-center">操作</th>
        </tr>
        <tbody style="border: 0">
            <tr>
                <td>1</td>
                <td class="text-left">系统缺陷</td>
                <td style="width: 30%"></td>
                <td>2017-12-09</td>
                <td>系统管理员</td>
                <td></td>
                <td></td>
                <td><a href="javascript:;">修改</a>&nbsp;<a href="javascript:;" class="del_this">删除</a></td>
            </tr>
            <tr>
                <td>2</td>
                <td class="text-left">优化建议</td>
                <td style="width: 30%"></td>
                <td>2017-12-09</td>
                <td>系统管理员</td>
                <td></td>
                <td></td>
                <td><a href="javascript:;">修改</a>&nbsp;<a href="javascript:;" class="del_this">删除</a></td>
            </tr>
        </tbody>
    </table>
    <h5 class="text-center"  style="font-size: 13px;font-weight: 500">
                    总共有12条记录，第1/2页,当前页<input id="page" type="text"  style="width: 40px" value="1"/><span id="gopage">Go</span>&nbsp;&nbsp;<span id="fistpage">首页</span>&nbsp;&nbsp;
                    每页显示
                    <select id="pagesize">
                        <option value='10' selected>10条</option>
                        <option value='15'>15条</option>
                        <option value='20'>20条</option>

                    </select>
                </h5>


<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
    })
</script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $(document).ready(function () {
          $(".addworkKind").click(function () {
            layer.open({
                type: 1,
                title: '&nbsp;',
                // shade: true,
                maxmin: true, //开启最大化最小化按钮
                area: ['600px', '400px'],
                content: '<form class="form-inline"><table class="table table-bordered"><tr><td style="width:120px;" class="text-right">类型名称<span class="colorRed">*</span></td><td><input type="text" name="" class="form-control"/></td></tr><tr><td class="text-right">类型说明</td><td><textarea class="form-control" style="width:70%;height:80px;resize:none"></textarea></td></tr></table><div class="padding-10 text-center"><button class="btn btn-primary btn-sm" type="button">提交</button><span class="lr_5"></span><button class="btn btn-warning btn-sm">返回</button></div></form>'
            })
            return false
        });

        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
        //删除
        $('.shanchu').click(function () {
            var link = $(this).attr('href')
            swal({
                title: "您确定要删除这条信息吗",
                text: "删除后将无法恢复，请谨慎操作！",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "删除",
                closeOnConfirm: false
            }, function (isConfirm) {
                if(isConfirm){
                    $.ajax({
                        'type':'post',
                        'url':link,
                        'dataType':'json',
                        'success':function (data) {
                            if(data.success){
                                location.reload()
                            }else
                                swal(data.msg, "", "error");
                        }
                    })
                }

            });
            return false
        });
    })
        //删除
        $('.del_this').click(function () {
            var id = $(this).data('id')
            swal({
                title: "",
                text: "确认删除",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "删除",
                closeOnConfirm: false
            }, function () {
                // $.ajax({
                //     'type':'post',
                //     'url':'/salls/public/index.php/index/cainiankaoheqi/delete.html',
                //     'data':{'id':id},
                //     'dataType':'json',
                //     'success':function (data) {
                //         if(data.success){
                //             location.reload()
                //         }else
                //             swal(data.msg, "", "error");
                //     }
                // })

            });
        });

</script>
</body>

</html>